package com.indexingsystem.boss.entity;

import java.io.Serializable;

public class OrderInfo implements Serializable{

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	
	/**
	 * 资源分类Id
	 */
	private String orderId;
	
	
	private String productId;
	
	/**
	 * 资源分类名称
	 */
	private String productName;
	
	/**
	 * 所属分类Id
	 */
	private String parentId;
	
	/**
	 * 所属分类名称
	 */
	private String resCategoryName;
	
	private String categoryOrder;
	
	private Integer isPublications;

	public String getOrderId() {
		return orderId;
	}

	public void setOrderId(String orderId) {
		this.orderId = orderId;
	}

	public String getProductName() {
		return productName;
	}

	public void setProductName(String productName) {
		this.productName = productName;
	}
	

	public String getResCategoryName() {
		return resCategoryName;
	}

	public void setResCategoryName(String resCategoryName) {
		this.resCategoryName = resCategoryName;
	}

	public OrderInfo() {
		super();
	}

	public String getProductId() {
		return productId;
	}

	public void setProductId(String productId) {
		this.productId = productId;
	}

	public String getParentId() {
		return parentId;
	}

	public void setParentId(String parentId) {
		this.parentId = parentId;
	}

	public String getCategoryOrder() {
		return categoryOrder;
	}

	public void setCategoryOrder(String categoryOrder) {
		this.categoryOrder = categoryOrder;
	}

	public Integer getIsPublications() {
		return isPublications;
	}

	public void setIsPublications(Integer isPublications) {
		this.isPublications = isPublications;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result
				+ ((categoryOrder == null) ? 0 : categoryOrder.hashCode());
		result = prime * result
				+ ((isPublications == null) ? 0 : isPublications.hashCode());
		result = prime * result + ((orderId == null) ? 0 : orderId.hashCode());
		result = prime * result
				+ ((parentId == null) ? 0 : parentId.hashCode());
		result = prime * result
				+ ((productId == null) ? 0 : productId.hashCode());
		result = prime * result
				+ ((productName == null) ? 0 : productName.hashCode());
		result = prime * result
				+ ((resCategoryName == null) ? 0 : resCategoryName.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		OrderInfo other = (OrderInfo) obj;
		if (categoryOrder == null) {
			if (other.categoryOrder != null)
				return false;
		} else if (!categoryOrder.equals(other.categoryOrder))
			return false;
		if (isPublications == null) {
			if (other.isPublications != null)
				return false;
		} else if (!isPublications.equals(other.isPublications))
			return false;
		if (orderId == null) {
			if (other.orderId != null)
				return false;
		} else if (!orderId.equals(other.orderId))
			return false;
		if (parentId == null) {
			if (other.parentId != null)
				return false;
		} else if (!parentId.equals(other.parentId))
			return false;
		if (productId == null) {
			if (other.productId != null)
				return false;
		} else if (!productId.equals(other.productId))
			return false;
		if (productName == null) {
			if (other.productName != null)
				return false;
		} else if (!productName.equals(other.productName))
			return false;
		if (resCategoryName == null) {
			if (other.resCategoryName != null)
				return false;
		} else if (!resCategoryName.equals(other.resCategoryName))
			return false;
		return true;
	}

	public OrderInfo(String orderId, String productId, String productName,
			String parentId, String resCategoryName, String categoryOrder,
			Integer isPublications) {
		super();
		this.orderId = orderId;
		this.productId = productId;
		this.productName = productName;
		this.parentId = parentId;
		this.resCategoryName = resCategoryName;
		this.categoryOrder = categoryOrder;
		this.isPublications = isPublications;
	}

	@Override
	public String toString() {
		return "OrderInfo [orderId=" + orderId + ", productId=" + productId
				+ ", productName=" + productName + ", parentId=" + parentId
				+ ", resCategoryName=" + resCategoryName + ", categoryOrder="
				+ categoryOrder + ", isPublications=" + isPublications + "]";
	}
}